From d1f504609f9e56343a0375d25965d3f718b40eef Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 24 May 1993 22:58:54 +0000 Subject: [PATCH] (modify_event_symbol): If a name_table elt is null, generate a name to use. Don't crash. --- src/keyboard.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index 327713942fb..371f4c3089e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2739,7 +2739,14 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_table, if (NILP (*slot)) { /* No; let's create it. */ - *slot = intern (name_table[symbol_num]); + if (name_table[symbol_num]) + *slot = intern (name_table[symbol_num]); + else + { + char buf[20]; + sprintf (buf, "key-%d", symbol_num); + *slot = intern (buf); + } /* Fill in the cache entries for this symbol; this also builds the Qevent_symbol_elements property, which the user -- 2.30.2